package com.util;

import java.io.Serializable;
import java.util.List;

public class Page implements Serializable {

	private int pageNum = 1;
	private int pageSize = 5;
	private int pageSum;
	private int totalCount;
	private int startNum;
	private List list;
	private boolean hasNext;
	private boolean hasPrev;
	
	public int getPageNum() {
		return pageNum;
	}
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageSum() {
		return (getTotalCount()-1)/getPageSize()+1;
	}
	public void setPageSum(int pageSum) {
		this.pageSum = pageSum;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getStartNum() {
		return (getPageNum()-1)*getPageSize();
	}
	public void setStartNum(int startNum) {
		this.startNum = startNum;
	}
	public List getList() {
		return list;
	}
	public void setList(List list) {
		this.list = list;
	}
	public boolean isHasNext() {
		return getPageNum()<getPageSum();
	}
	public void setHasNext(boolean hasNext) {
		this.hasNext = hasNext;
	}
	public boolean isHasPrev() {
		return getPageNum()>1;
	}
	public void setHasPrev(boolean hasPrev) {
		this.hasPrev = hasPrev;
	}
	
	
	
}
